/*
 * systemtime.h
 *
 *  Created on: Jul 21, 2014
 *      Author: root
 */

#ifndef MLSMARLIN_H_
#define MLSMARLIN_H_

#include "mlsInclude.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef enum
{
    STATE_TYPE_A        = (UInt16)0X01<<0,
    STATE_PAUSE_1       = (UInt16)0X01<<1,
    STATE_TYPE_B        = (UInt16)0X01<<2,
    STATE_TYPE_BP       = (UInt16)0X01<<3,
    STATE_TYPE_PICOPASS = (UInt16)0X01<<4,
    STATE_TYPE_F424     = (UInt16)0X01<<5,
    STATE_TYPE_F212     = (UInt16)0x01<<6,
    STATE_PAUSE_2       = (UInt16)0X01<<7,
    STATE_15693         = (UInt16)0x01<<8,
} DiscoveryStates_t;

typedef enum
{
    TYPEA_MF_ULTRALIGHT    =0x01,
    TYPEA_MF_ULTRALIGHT_C  =0x02,
    TYPEA_MF_CLASSIC       =0x03,
    TYPEA_MF_CLASSIC_1K    =0x04,
    TYPEA_MF_CLASSIC_4K    =0x05,
    TYPEA_MF_PLUS          =0x06,
    TYPEA_MF_PLUS_2K_SL1   =0x07,
    TYPEA_MF_PLUS_4K_SL1   =0x08,
    TYPEA_MF_PLUS_2K_SL2   =0x09,
    TYPEA_MF_PLUS_4K_SL2   =0x0A,
    TYPEA_MF_PLUS_2K_SL3   =0x0B,
    TYPEA_MF_PLUS_4K_SL3   =0x0C,
    TYPEA_MF_DESFIRE       =0x0D,
    TYPEA_JCOP             =0x0F,
    TYPEA_MF_MINI          =0x10,
    TYPEA_NPA              =0x11,
    TYPEA_PART4			   =0x12,
    TYPEA_UNKNOWN          =0xFF
}typeACardType_t;


typedef void (* NfcHandlerFp)(Void * pParam);

typedef struct mlsNfcParam_st
{
	Bool cardStatusChange;
	Bool isTransparentMode;
	//call back function
	NfcHandlerFp _cbCardAbsent;
	NfcHandlerFp _cbCardPresent;

}mlsNfcParam_t;

extern Int32 testMain();
extern mlsErrorCode_t mlsEepromInit(void);
extern mlsErrorCode_t mlsNfcInit(void *param);
extern mlsErrorCode_t mlsTricLedInit(void *param);

extern void mlsNfcUpdate(void *Param);
extern void mlsNfcUpdateLedStates(void *param);
extern mlsErrorCode_t mlsTricLedUpdate(void *Param);
extern char *mlsGetIPv4();

extern mlsErrorCode_t mlsNfcGetCardSerialNumber(UInt16 exLen, UInt8 *outBuf,UInt16 *outBufLen);
extern DiscoveryStates_t mlsNfcGetCardType(void);
extern mlsErrorCode_t mlsNfcGetSlotStatus();

extern mlsErrorCode_t mlsMarlinDev_EngineInit();

#ifdef __cplusplus
}
#endif

#endif /* MLSMARLIN_H_ */
